# 1. 最低CMake版本要求
cmake_minimum_required(VERSION 3.28)

# 2. 项目名称
project(astar_planner)

# 3. C++标准配置
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 4. 寻找依赖库（OpenCV 4 和 yaml-cpp）
find_package(OpenCV 4 REQUIRED)
find_package(yaml-cpp REQUIRED)

# 5. 指定编译的源文件（main.cpp + astar_planner.cpp）
add_executable(astar_planner 
    main.cpp 
    astar_planner.cpp
)

# 6. 链接依赖库到可执行文件
target_link_libraries(astar_planner 
    ${OpenCV_LIBS}
    yaml-cpp
)